package com.edu.learning.concurrent.sample.mode2;

import java.time.Duration;
import java.time.LocalTime;

/**
 * @author ll
 * @Date 2017/10/25 17:37
 */
public class RecursiveSequenceDemo {
    private final static int NUMBER = 10000000;

    public static void main(String[] args) {
        double[] array = new double[NUMBER];
        for (int i = 0; i < NUMBER; i ++) {
            array[i] = i;
        }
        LocalTime start = LocalTime.now();
        for (int i = 0; i < NUMBER; i ++) {
            array[i] = Math.sin(array[i]) + Math.cos(array[i]) + Math.tan(array[i]);
        }
        LocalTime end = LocalTime.now();
        System.out.println("Time span = " + Duration.between(start, end));//Time span = PT15.717S
    }
}
